package com.ding.easycontroller.dao.impl;

import com.ding.easycontroller.dao.FilterDao;
import com.ding.easycontroller.file.FilterFile;
import com.ding.easycontroller.work.Filter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
public class FilterDaoImpl implements FilterDao {


    @Autowired
    private FilterFile filterFile;



    @Override
    public void removeById(String id) {
        filterFile.remove(id);
    }

    @Override
    public List<Filter> listAll() {
        return filterFile.listAll();
    }

    @Override
    public void add(Filter filter) {
        filterFile.add(filter);
    }

    @Override
    public void update(Filter filter) {
        filterFile.update(filter);
    }

}
